#include<stdio.h>

int main()
{
    long hh, mm, ss, n;
    scanf("%ld:%ld:%ld%ld", &hh, &mm, &ss, &n);
    long time = hh * 3600 + mm * 60 + ss + n;
    hh = time / 3600;
    mm = (time - hh * 3600) / 60;
    ss = time - hh * 3600 - mm * 60;
    if(hh >= 24)
    {
        hh -= 24;
    }
    printf("%02ld:%02ld:%02ld", hh, mm, ss);

    return 0;
}